﻿using CQRSLearn.Caching;
using CQRSLearn.Features.Products.Dtos;
using MediatR;

namespace CQRSLearn.Features.Products.Queries.Get
{
    public record GetProductQuery(Guid Id) : IRequest<ProductDto?>, ICacheable
    {
        public bool BypassCache => false;

        public string CacheKey => $"product:{Id}";

        public int SlidingExpirationInMinutes => 30;

        public int AbsoluteExpirationInMinutes => 60;
    }
}
